home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr25 / inftxt.zip / DOSCOPY.TXT < prev    next >
Text File  |  1993-03-26  |  8KB  |  103 lines

  1.                                                                                 
  2. PRINT SELECTION FOR APAR - II06080 92/07/14                                     
  3. APAR= II06080  SER=                            IN INCOROUT                      
  4. APPARENT PROBLEM WITH DOSCOPY() SUBROUTINE ON OS/2 2.0                          
  5.                                                                                 
  6. STAT= INTRAN       FESN5NFO000-000  CTID= II0000 ISEV= 4                        
  7. SB92/06/09  RC          CL          PD           SEV= 4                         
  8.                        PE=                       TYPE= I                        
  9. RCOMP= INFOPCLIB    PC LIB INFO ITE RREL= R001                                  
  10. FCOMP=                              PFREL= F     TREL= T                        
  11. ACTION=             SEC/INT=                     DUP/                           
  12. USPTF=              PDPTF=                       DUPS 0                         
  13. DW92/06/09  RT          SC          FT                                          
  14. RE          PT          UP          LP                                          
  15. PV          AP          EN          FL                                          
  16. LC92/06/09  RU92/06/09                                                          
  17.                              CUST INST LVL/SU=                                  
  18. FAILING MODULE=              FAILING LVL/SU=                                    
  19. SYSROUTE OF:          RET APAR=             PS=                                 
  20. COMP OPER ENV=                                                                  
  21.                                                                                 
  22.                                                                                 
  23. SYSRES=      SYSIN=      SYSOUT=      CPU=             RE-IPL=                  
  24. OPTYPE=                 SPECIAL ACTIVITY=          REGRESSION=                  
  25. PRE-SCREEN NO.=          RSCP= RS000                                            
  26. ERROR DESCRIPTION:                                                              
  27. Keywords:  OS2INFOAPAR OS2DOSAP                                                 
  28. .                                                                               
  29. I believe that the DosCopy() subroutine has a defect that                       
  30. prevents reliable date and time stamp setting of the target file                
  31. when copying from a remote DOS LAN server to a local OS/2 2.0                   
  32. filesystem.                                                                     
  33.                                                                                 
  34. I was recently informed of a situation in which a file copy                     
  35. utility that I wrote (ccp - conditional copy) was incorrectly                   
  36. setting the date and time of target files.  The ccp program                     
  37. uses the DosCopy() subroutine to perform any actual file copy                   
  38. operations.                                                                     
  39. .                                                                               
  40. For example, the bldtt.asm file had a source date and time of                   
  41. 6/28/91 and 12:55p.  After the copy, its target date and time                   
  42. was 6/22/96 and 5:07p.  In fact, about 400 files out of a                       
  43. total of 2000 files had incorrect date and time stamps after                    
  44. the copy.  (The incorrect target date and time stamps are                       
  45. neither those of the source file nor those of the current time                  
  46. and date.)  The results appear repeatable:  the same files get                  
  47. the same bad timestamps each time.                                              
  48. .                                                                               
  49. The environment is as follows:                                                  
  50.                                                                                 
  51.      1) The ccp (conditonal copy) program, a 16-bit OS/2                        
  52.         application, is running on an OS/2 2.0 system.  It                      
  53.         uses the DosCopy() subroutine to perform the copy                       
  54.         operation on each file that needs to be copied.                         
  55.                                                                                 
  56.      2) The source files exist on a DOS machine running LAN                     
  57.         Server.  The local OS/2 2.0 machine accesses the DOS                    
  58.         machine's files via a remote drive that is set up by                    
  59.         the NET USE command.                                                    
  60.                                                                                 
  61.      3) About 2000 files were copied.  Of these, about 400                      
  62.         files had date and time stamps on the OS/2 2.0 system                   
  63.         that did not match the date and time stamp of the                       
  64.         source file on the DOS system.  (No data was lost or                    
  65.         corrupted, though).                                                     
  66.                                                                                 
  67.      4) The results are repeatable:  Files that copy ok                         
  68.         always copy ok.  Files that get an incorrect target                     
  69.         date and time always get the same incorrect date and                    
  70.         time.                                                                   
  71.                                                                                 
  72. The standard COPY command & DOS-only version of ccp did not fail                
  73.                                                                                 
  74.      1) The built-in OS/2 COPY command correctly set the                        
  75.         date and time stamps of the target files.                               
  76.                                                                                 
  77.      2) The DOS-only version of ccp also set the date and                       
  78.         time stamps of the target files correctly.                              
  79. .                                                                               
  80. Notes about the ccp program:                                                    
  81.                                                                                 
  82.     (a) The OS/2-only version was developed on OS/2 1.3 using C2                
  83.         1.1 and the OS/2 1.3 toolkit.  Once it determines the                   
  84.         exact source and target names of a file to copy,it calls                
  85.         the DosOpen subroutine to perform the actual copy.                      
  86.                                                                                 
  87.    (b) The DOS-only version was developed using the C/2 1.1 on a                
  88.        DOS machine.  It uses the open, close, read, and write                   
  89.        subroutines to copy the file's data (it ignores EAs).  It                
  90.        also uses the _dos_setftime and _dos_setfileattr                         
  91.        subroutines to set a target file's date, time, and                       
  92.        attributes to those of the source file.                                  
  93. LOCAL FIX:                                                                      
  94. See above description.                                                          
  95.                                                                                 
  96.                                                                                 
  97.                                                                                 
  98.                                                                                 
  99.                                                                                 
  100.                                                                                 
  101.                                                                                 
  102.                                                                                 
  103.